package com.wondream.myframework.app.common.config.cfsscofl;

import com.wondream.myframework.app.common.aspect.CheckSignCustomReqRspExtend;
import com.wondream.myframework.app.common.aspect.DbFieldInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(CoflProperties.class)
@Slf4j
public class CoflConfiguration {

    @Autowired
    private CoflProperties coflProperties;

    @Bean
    public CheckSignCustomReqRspExtend checkSignCustomReqRspExtend(){
        return new CheckSignCustomReqRspExtend();
    }

//    @Bean
//    public DefaultDataSourceBean dataSource() throws Exception {
//        return new DefaultDataSourceBean("dataSource");
//    }

//    @Bean
//    public InitStartup initStartup(){
//        return new InitStartup();
//    }

    @Bean
    public DbFieldInterceptor initDbFieldInterceptor(){
        return new DbFieldInterceptor();
    }
}
